package defectsim.agents;

import repast.simphony.space.Dimensions;
import repast.simphony.space.continuous.ContinuousAdder;
import repast.simphony.space.continuous.ContinuousSpace;

@SuppressWarnings("hiding")
public class DefectCartesianAdder<DefectAgent> implements ContinuousAdder<Located>{
	@Override
	public void add(ContinuousSpace<Located> space, Located obj){
		Dimensions dims = space.getDimensions();
		double[] location = new double[dims.size()];
		location[0] = obj.getX();
		location[1] = obj.getY();
		space.moveTo(obj, location);
	}
}
